function mpc = Case_IEEE_57

%% MATPOWER Case Format : Version 2
mpc.version = '2';

%%-----  Power Flow Data  -----%%
%% system MVA base
mpc.baseMVA = 100;

%% bus data
%	bus_i	type	Pd	Qd	Gs	Bs	area	Vm	Va	baseKV	zone	Vmax	Vmin
mpc.bus = [
    1	3	55	17	0	0	1	1.04	0	0	1	1.06	0.94;
    2	2	3	88	0	0	1	1.01	-1.18	0	1	1.06	0.94;
    3	2	41	21	0	0	1	0.985	-5.97	0	1	1.06	0.94;
    4	1	0	0	0	0	1	0.981	-7.32	0	1	1.06	0.94;
    5	1	13	4	0	0	1	0.976	-8.52	0	1	1.06	0.94;
    6	2	75	2	0	0	1	0.98	-8.65	0	1	1.06	0.94;
    7	1	0	0	0	0	1	0.984	-7.58	0	1	1.06	0.94;
    8	2	150	22	0	0	1	1.005	-4.45	0	1	1.06	0.94;
    9	2	121	26	0	0	1	0.98	-9.56	0	1	1.06	0.94;
    10	1	5	2	0	0	1	0.986	-11.43	0	1	1.06	0.94;
    11	1	0	0	0	0	1	0.974	-10.17	0	1	1.06	0.94;
    12	2	377	24	0	0	1	1.015	-10.46	0	1	1.06	0.94;
    13	1	18	2.3	0	0	1	0.979	-9.79	0	1	1.06	0.94;
    14	1	10.5	5.3	0	0	1	0.97	-9.33	0	1	1.06	0.94;
    15	1	22	5	0	0	1	0.988	-7.18	0	1	1.06	0.94;
    16	1	43	3	0	0	1	1.013	-8.85	0	1	1.06	0.94;
    17	1	42	8	0	0	1	1.017	-5.39	0	1	1.06	0.94;
    18	1	27.2	9.8	0	0	1	1.001	-11.71	0	1	1.06	0.94;
    19	1	3.3	0.6	0	0	1	0.97	-13.2	0	1	1.06	0.94;
    20	1	2.3	1	0	0	1	0.964	-13.41	0	1	1.06	0.94;
    21	1	0	0	0	0	1	1.008	-12.89	0	1	1.06	0.94;
    22	1	0	0	0	0	1	1.01	-12.84	0	1	1.06	0.94;
    23	1	6.3	2.1	0	0	1	1.008	-12.91	0	1	1.06	0.94;
    24	1	0	0	0	0	1	0.999	-13.25	0	1	1.06	0.94;
    25	1	6.3	3.2	0	0	1	0.982	-18.13	0	1	1.06	0.94;
    26	1	0	0	0	0	1	0.959	-12.95	0	1	1.06	0.94;
    27	1	9.3	0.5	0	0	1	0.982	-11.48	0	1	1.06	0.94;
    28	1	4.6	2.3	0	0	1	0.997	-10.45	0	1	1.06	0.94;
    29	1	17	2.6	0	0	1	1.01	-9.75	0	1	1.06	0.94;
    30	1	3.6	1.8	0	0	1	0.962	-18.68	0	1	1.06	0.94;
    31	1	5.8	2.9	0	0	1	0.936	-19.34	0	1	1.06	0.94;
    32	1	1.6	0.8	0	0	1	0.949	-18.46	0	1	1.06	0.94;
    33	1	3.8	1.9	0	0	1	0.947	-18.5	0	1	1.06	0.94;
    34	1	0	0	0	0	1	0.959	-14.1	0	1	1.06	0.94;
    35	1	6	3	0	0	1	0.966	-13.86	0	1	1.06	0.94;
    36	1	0	0	0	0	1	0.976	-13.59	0	1	1.06	0.94;
    37	1	0	0	0	0	1	0.985	-13.41	0	1	1.06	0.94;
    38	1	14	7	0	0	1	1.013	-12.71	0	1	1.06	0.94;
    39	1	0	0	0	0	1	0.983	-13.46	0	1	1.06	0.94;
    40	1	0	0	0	0	1	0.973	-13.62	0	1	1.06	0.94;
    41	1	6.3	3	0	0	1	0.996	-14.05	0	1	1.06	0.94;
    42	1	7.1	4.4	0	0	1	0.966	-15.5	0	1	1.06	0.94;
    43	1	2	1	0	0	1	1.01	-11.33	0	1	1.06	0.94;
    44	1	12	1.8	0	0	1	1.017	-11.86	0	1	1.06	0.94;
    45	1	0	0	0	0	1	1.036	-9.25	0	1	1.06	0.94;
    46	1	0	0	0	0	1	1.05	-11.89	0	1	1.06	0.94;
    47	1	29.7	11.6	0	0	1	1.033	-12.49	0	1	1.06	0.94;
    48	1	0	0	0	0	1	1.027	-12.59	0	1	1.06	0.94;
    49	1	18	8.5	0	0	1	1.036	-12.92	0	1	1.06	0.94;
    50	1	21	10.5	0	0	1	1.023	-13.39	0	1	1.06	0.94;
    51	1	18	5.3	0	0	1	1.052	-12.52	0	1	1.06	0.94;
    52	1	4.9	2.2	0	0	1	0.98	-11.47	0	1	1.06	0.94;
    53	1	20	10	0	0	1	0.971	-12.23	0	1	1.06	0.94;
    54	1	4.1	1.4	0	0	1	0.996	-11.69	0	1	1.06	0.94;
    55	1	6.8	3.4	0	0	1	1.031	-10.78	0	1	1.06	0.94;
    56	1	7.6	2.2	0	0	1	0.968	-16.04	0	1	1.06	0.94;
    57	1	6.7	2	0	0	1	0.965	-16.56	0	1	1.06	0.94;
    ];

%% generator data
%	bus	Pg	Qg	Qmax	Qmin	Vg	mBase	status	Pmax	Pmin	Pc1	Pc2	Qc1min	Qc1max	Qc2min	Qc2max	ramp_agc	ramp_10	ramp_30	ramp_q	apf
mpc.gen = [
    1	128.9	-16.1	200	-140	1.04	100	1	575.88	0	0	0	0	0	0	0	0	0	0	0	0;
    2	0	-0.8	50	-17	1.01	100	1	100	30	0	0	0	0	0	0	0	0	0	0	0;
    3	40	-1	60	-10	0.985	100	1	140	42	0	0	0	0	0	0	0	0	0	0	0;
    6	0	0.8	25	-8	0.98	100	1	100	30	0	0	0	0	0	0	0	0	0	0	0;
    8	450	62.1	200	-140	1.005	100	1	550	165	0	0	0	0	0	0	0	0	0	0	0;
    9	0	2.2	9	-3	0.98	100	1	100	30	0	0	0	0	0	0	0	0	0	0	0;
    12	310	128.5	155	-150	1.015	100	1	410	123	0	0	0	0	0	0	0	0	0	0	0;
    ];

%% branch data
%	fbus	tbus	r	x	b	rateA	rateB	rateC	ratio	angle	status	ratiomax	ratiomin
mpc.branch = [
    1	2	0.0083	0.028	0.129	400	0	0	0	0	1	0	0;
    2	3	0.0298	0.085	0.0818	200	0	0	0	0	1	0	0;
    3	4	0.0112	0.0366	0.038	200	0	0	0	0	1	0	0;
    4	5	0.0625	0.132	0.0258	200	0	0	0	0	1	0	0;
    4	6	0.043	0.148	0.0348	200	0	0	0	0	1	0	0;
    6	7	0.02	0.102	0.0276	200	0	0	0	0	1	0	0;
    6	8	0.0339	0.173	0.047	200	0	0	0	0	1	0	0;
    8	9	0.0099	0.0505	0.0548	400	0	0	0	0	1	0	0;
    9	10	0.0369	0.1679	0.044	200	0	0	0	0	1	0	0;
    9	11	0.0258	0.0848	0.0218	200	0	0	0	0	1	0	0;
    9	12	0.0648	0.295	0.0772	200	0	0	0	0	1	0	0;
    9	13	0.0481	0.158	0.0406	200	0	0	0	0	1	0	0;
    13	14	0.0132	0.0434	0.011	200	0	0	0	0	1	0	0;
    13	15	0.0269	0.0869	0.023	200	0	0	0	0	1	0	0;
    1	15	0.0178	0.091	0.0988	400	0	0	0	0	1	0	0;
    1	16	0.0454	0.206	0.0546	200	0	0	0	0	1	0	0;
    1	17	0.0238	0.108	0.0286	200	0	0	0	0	1	0	0;
    3	15	0.0162	0.053	0.0544	200	0	0	0	0	1	0	0;
    4	18	0	0.555	0	50	0	0	0.97	0	1	1.1	0.9;
    4	18	0	0.43	0	50	0	0	0.978	0	1	1.1	0.9;
    5	6	0.0302	0.0641	0.0124	50	0	0	0	0	1	0	0;
    7	8	0.0139	0.0712	0.0194	200	0	0	0	0	1	0	0;
    10	12	0.0277	0.1262	0.0328	200	0	0	0	0	1	0	0;
    11	13	0.0223	0.0732	0.0188	200	0	0	0	0	1	0	0;
    12	13	0.0178	0.058	0.0604	200	0	0	0	0	1	0	0;
    12	16	0.018	0.0813	0.0216	200	0	0	0	0	1	0	0;
    12	17	0.0397	0.179	0.0476	200	0	0	0	0	1	0	0;
    14	15	0.0171	0.0547	0.0148	200	0	0	0	0	1	0	0;
    18	19	0.461	0.685	0	50	0	0	0	0	1	0	0;
    19	20	0.283	0.434	0	50	0	0	0	0	1	0	0;
    21	20	0	0.7767	0	50	0	0	1.043	0	1	1.1	0.9;
    21	22	0.0736	0.117	0	200	0	0	0	0	1	0	0;
    22	23	0.0099	0.0152	0	50	0	0	0	0	1	0	0;
    23	24	0.166	0.256	0.0084	50	0	0	0	0	1	0	0;
    24	25	0	1.182	0	50	0	0	1	0	1	0	0;
    24	25	0	1.23	0	50	0	0	1	0	1	0	0;
    24	26	0	0.0473	0	50	0	0	1.043	0	1	1.1	0.9;
    26	27	0.165	0.254	0	200	0	0	0	0	1	0	0;
    27	28	0.0618	0.0954	0	200	0	0	0	0	1	0	0;
    28	29	0.0418	0.0587	0	200	0	0	0	0	1	0	0;
    7	29	0	0.0648	0	100	0	0	0.967	0	1	1.1	0.9;
    25	30	0.135	0.202	0	50	0	0	0	0	1	0	0;
    30	31	0.326	0.497	0	50	0	0	0	0	1	0	0;
    31	32	0.507	0.755	0	50	0	0	0	0	1	0	0;
    32	33	0.0392	0.036	0	50	0	0	0	0	1	0	0;
    34	32	0	0.953	0	50	0	0	0.975	0	1	1.1	0.9;
    34	35	0.052	0.078	0.0032	50	0	0	0	0	1	0	0;
    35	36	0.043	0.0537	0.0016	200	0	0	0	0	1	0	0;
    36	37	0.029	0.0366	0	200	0	0	0	0	1	0	0;
    37	38	0.0651	0.1009	0.002	200	0	0	0	0	1	0	0;
    37	39	0.0239	0.0379	0	50	0	0	0	0	1	0	0;
    36	40	0.03	0.0466	0	50	0	0	0	0	1	0	0;
    22	38	0.0192	0.0295	0	200	0	0	0	0	1	0	0;
    11	41	0	0.749	0	50	0	0	0.955	0	1	1.1	0.9;
    41	42	0.207	0.352	0	50	0	0	0	0	1	0	0;
    41	43	0	0.412	0	200	0	0	0	0	1	0	0;
    38	44	0.0289	0.0585	0.002	200	0	0	0	0	1	0	0;
    15	45	0	0.1042	0	100	0	0	0.955	0	1	1.1	0.9;
    14	46	0	0.0735	0	100	0	0	0.9	0	1	1.1	0.9;
    46	47	0.023	0.068	0.0032	200	0	0	0	0	1	0	0;
    47	48	0.0182	0.0233	0	200	0	0	0	0	1	0	0;
    48	49	0.0834	0.129	0.0048	50	0	0	0	0	1	0	0;
    49	50	0.0801	0.128	0	200	0	0	0	0	1	0	0;
    50	51	0.1386	0.22	0	200	0	0	0	0	1	0	0;
    10	51	0	0.0712	0	100	0	0	0.93	0	1	1.1	0.9;
    13	49	0	0.191	0	100	0	0	0.895	0	1	1.1	0.9;
    29	52	0.1442	0.187	0	200	0	0	0	0	1	0	0;
    52	53	0.0762	0.0984	0	200	0	0	0	0	1	0	0;
    53	54	0.1878	0.232	0	200	0	0	0	0	1	0	0;
    54	55	0.1732	0.2265	0	200	0	0	0	0	1	0	0;
    11	43	0	0.153	0	50	0	0	0.958	0	1	1.1	0.9;
    44	45	0.0624	0.1242	0.004	200	0	0	0	0	1	0	0;
    40	56	0	1.195	0	50	0	0	0.958	0	1	1.1	0.9;
    56	41	0.553	0.549	0	50	0	0	0	0	1	0	0;
    56	42	0.2125	0.354	0	50	0	0	0	0	1	0	0;
    39	57	0	1.355	0	50	0	0	0.98	0	1	1.1	0.9;
    57	56	0.174	0.26	0	50	0	0	0	0	1	0	0;
    38	49	0.115	0.177	0.003	200	0	0	0	0	1	0	0;
    38	48	0.0312	0.0482	0	200	0	0	0	0	1	0	0;
    9	55	0	0.1205	0	200	0	0	0.94	0	1	1.1	0.9;
    ];

%%-----  OPF Data  -----%%
%% generator cost data
%	1	startup	shutdown	n	x1	y1	...	xn	yn
%	2	startup	shutdown	n	c(n-1)	...	c0
% mpc.gencost = [
% 	2	0	0	3	0.00375     2   	0;
% 	2	0	0	3	0.0175      1.75	0;
% 	2	0	0	3	0.025       3   	0;
% 	2	0	0	3	0.00375     2   	0;
% 	2	0	0	3	0.0625  	1   	0;
% 	2	0	0	3	0.0195      1.75  	0;
% 	2	0	0	3	0.00834 	3.25	0;
% ];
mpc.gencost = [
    2	0	0	3	0.0775795	20	0;
    2	0	0	3	0.01	40	0;
    2	0	0	3	0.25	20	0;
    2	0	0	3	0.01	40	0;
    2	0	0	3	0.0222222	20	0;
    2	0	0	3	0.01	40	0;
    2	0	0	3	0.0322581	20	0;
    ];
